<template>
    <div>
        <center>
            <h1>BusChildLevel2</h1>
            <button @click="changeBusChildBrotherLevel1Title">
                利用Bus修改父的兄弟组件的标题
            </button>
        </center>
    </div>
</template>

<script>
export default {
    methods: {
        changeBusChildBrotherLevel1Title() {
            this.$bus.$emit(
                'changeBusChildBrotherLevel1Title',
                '非父子组件通讯修改后的标题'
            );
        },
    },
    mounted() {
        this.changeBusChildBrotherLevel1Title();
    },
};
</script>

<style></style>
